package cn.edu.zafu.bigdata.psy;

class MathOperations {
    public int add(int a, int b) {
        return a + b;
    }

    public double add(double a, double b) {
        return a + b;
    }

    public int add(int a, int b, int c) {
        return a + b + c;
    }
}

public class Question2 {
    public static void main(String[] args) {
        MathOperations mathOps = new MathOperations();

        int sumInts = mathOps.add(2, 4);
        System.out.println("Sum of 5 and 10 (integers): " + sumInts);

        double sumDoubles = mathOps.add(6.6, 10.2);
        System.out.println("Sum of 5.5 and 10.2 (doubles): " + sumDoubles);

        int sumThreeInts = mathOps.add(2, 3, 4);
        System.out.println("Sum of 5, 10, and 15 (integers): " + sumThreeInts);
    }
}